package com.pj.wisdomlogistics.mvp.presenter;


import com.pj.wisdomlogistics.entity.MeetingPlanSimpleInfo;
import com.pj.wisdomlogistics.mvp.contract.MeetingPlanContract;
import com.pj.wisdomlogistics.mvp.frame.ActivityPresenter;
import com.pj.wisdomlogistics.mvp.model.MeetingPlanModel;
import com.pj.wisdomlogistics.rx.FilterSubscriber;

import java.util.List;


public class MeetingPlanPresenter extends ActivityPresenter<MeetingPlanModel,MeetingPlanContract.View> implements MeetingPlanContract.Presenter{
    public static final String TAG = "MeetingPlanPresenter";

    @Override
    public void meetingTimeAxis(int meetingRoomID) {
        addSubscription(getModel().meetingTimeAxis(meetingRoomID), new FilterSubscriber<List<MeetingPlanSimpleInfo>>() {
            @Override
            public void onNext(List<MeetingPlanSimpleInfo> mList) {
                getView().Success(mList);
            }

            @Override
            public void onError(int errorCode, String errorMsg) {
                getView().onError(errorMsg);
            }

        });
    }
}
